﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.Collections.Generic;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category6
{
  public class MT646 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagSequenceDefinition U0002;
    private static SwiftTagDefinition U0003;
    private static SwiftTagSubItemDefinition U0004;
    private static SwiftTagDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;
    private static SwiftTagDefinition U000E;
    private static SwiftTagDefinition U000F;
    private static SwiftTagDefinition U0010;
    private static SwiftTagSubItemDefinition U0011;
    private static SwiftTagDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagSubItemDefinition U0014;
    private static SwiftTagSubItemDefinition U0015;
    private static SwiftTagDefinition U0016;
    private static SwiftTagSubItemDefinition U0017;
    private static SwiftTagSubItemDefinition U0018;
    private static SwiftTagSequenceDefinition U0019;
    private static SwiftTagDefinition U001A;
    private static SwiftTagSubItemDefinition U001B;
    private static SwiftTagSubItemDefinition U001C;
    private static SwiftTagSubItemDefinition U001D;
    private static SwiftTagSubItemDefinition U001E;
    private static SwiftTagSubItemDefinition U001F;
    private static SwiftTagSubItemDefinition U007F;
    private static SwiftTagDefinition U0080;
    private static SwiftTagSubItemDefinition U0081;
    private static SwiftTagSubItemDefinition U0082;
    private static SwiftTagDefinition U0083;
    private static SwiftTagSubItemDefinition U0084;
    private static SwiftTagChoiceDefinition U0086;
    private static SwiftTagDefinition U0087;
    private static SwiftTagSubItemDefinition U0088;
    private static SwiftTagSubItemDefinition U0089;
    private static SwiftTagSubItemDefinition U008A;
    private static SwiftTagSubItemDefinition U008B;
    private static SwiftTagSubItemDefinition U008C;
    private static SwiftTagDefinition U008D;
    private static SwiftTagSubItemDefinition U008E;
    private static SwiftTagSubItemDefinition U008F;
    private static SwiftTagSubItemDefinition U0090;
    private static SwiftTagSubItemDefinition U0091;
    private static SwiftTagSubItemDefinition U0092;
    private static SwiftTagDefinition U0093;
    private static SwiftTagSubItemDefinition U0094;
    private static SwiftTagSubItemDefinition U0095;
    private static SwiftTagSubItemDefinition U0096;
    private static SwiftTagSubItemDefinition U0097;
    private static SwiftTagSubItemDefinition U0098;
    private static SwiftTagDefinition U0099;
    private static SwiftTagSubItemDefinition U009A;
    private static SwiftTagSubItemDefinition U009B;
    private static SwiftTagSubItemDefinition U009C;
    private static SwiftTagSubItemDefinition U009D;
    private static SwiftTagSubItemDefinition U009E;
    private static SwiftTagDefinition U009F;
    private static SwiftTagSubItemDefinition U0001U0002;
    private static SwiftTagSubItemDefinition U0002U0002;
    private static SwiftTagSubItemDefinition U0003U0002;
    private static SwiftTagSubItemDefinition U0004U0002;
    private static SwiftTagSubItemDefinition U0005U0002;
    private static SwiftTagDefinition U0006U0002;
    private static SwiftTagSubItemDefinition U0007U0002;
    private static SwiftTagSubItemDefinition U0008U0002;
    private static SwiftTagSubItemDefinition U000EU0002;
    private static SwiftTagSubItemDefinition U000FU0002;
    private static SwiftTagSubItemDefinition U0010U0002;
    private static SwiftTagDefinition U0011U0002;
    private static SwiftTagSequenceDefinition U0012U0002;
    private static SwiftTagDefinition U0013U0002;
    private static SwiftTagSubItemDefinition U0014U0002;
    private static SwiftTagSubItemDefinition U0015U0002;
    private static SwiftTagSubItemDefinition U0016U0002;
    private static SwiftTagDefinition U0017U0002;
    private static SwiftTagSubItemDefinition U0018U0002;
    private static SwiftTagDefinition U0019U0002;
    private static SwiftTagSubItemDefinition U001AU0002;
    private static SwiftTagDefinition U001BU0002;
    private static SwiftTagSubItemDefinition U001CU0002;
    private static SwiftTagChoiceDefinition U001DU0002;
    private static SwiftTagDefinition U001EU0002;
    private static SwiftTagSubItemDefinition U001FU0002;
    private static SwiftTagSubItemDefinition U007FU0002;
    private static SwiftTagSubItemDefinition U0080U0002;
    private static SwiftTagDefinition U0081U0002;
    private static SwiftTagSubItemDefinition U0082U0002;
    private static SwiftTagSubItemDefinition U0083U0002;
    private static SwiftTagSubItemDefinition U0084U0002;
    private static SwiftTagChoiceDefinition U0086U0002;
    private static SwiftTagDefinition U0087U0002;
    private static SwiftTagSubItemDefinition U0088U0002;
    private static SwiftTagSubItemDefinition U0089U0002;
    private static SwiftTagDefinition U008AU0002;
    private static SwiftTagSubItemDefinition U008BU0002;
    private static SwiftTagSubItemDefinition U008CU0002;
    private static SwiftTagDefinition U008DU0002;
    private static SwiftTagSubItemDefinition U008EU0002;
    private static SwiftTagSubItemDefinition U008FU0002;
    private static SwiftTagDefinition U0090U0002;
    private static SwiftTagSubItemDefinition U0091U0002;
    private static SwiftTagSubItemDefinition U0092U0002;
    private static SwiftTagSubItemDefinition U0093U0002;
    private static SwiftTagSubItemDefinition U0094U0002;
    private static SwiftTagSubItemDefinition U0095U0002;
    private static SwiftTagSubItemDefinition U0096U0002;
    private static SwiftTagDefinition U0097U0002;

    [Description("Identification of the Facility")]
    public MT646.SequenceAClass SequenceA
    {
      get
      {
        return new MT646.SequenceAClass((SwiftElement) this, 0, false);
      }
    }

    [Description("Interest Calculation")]
    public MT646.SequenceBClass[] SequenceB
    {
      get
      {
        int index = -1;
        List<MT646.SequenceBClass> list = new List<MT646.SequenceBClass>();
        int count;
        do
        {
          ++index;
          MT646.SequenceBClass sequenceBclass = new MT646.SequenceBClass((SwiftElement) this, index, false);
          count = this.ListTags((SwiftElement) sequenceBclass).Count;
          if (count > 0)
            list.Add(sequenceBclass);
        }
        while (count > 0);
        return list.ToArray();
      }
    }

    [Description("Principal Payment/Sum of Interest Due")]
    public MT646.SequenceCClass SequenceC
    {
      get
      {
        return new MT646.SequenceCClass((SwiftElement) this, 0, false);
      }
    }

    public MT646()
      : base(true)
    {
    }

    public MT646(SwiftMessage message)
      : base(message)
    {
    }

    public MT646.SequenceBClass AddSequenceB()
    {
      return new MT646.SequenceBClass((SwiftElement) this, this.SequenceB.Length, true);
    }

    public void RemoveSequenceB(MT646.SequenceBClass sequence)
    {
      foreach (SwiftTag tag in this.ListTags((SwiftElement) sequence))
        this.RemoveTag(tag);
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT646.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT646.MessageDefinition = new SwiftMessageDefinition("MT646", "Payment of Principal and/or of Interest");
      MT646.U0002 = new SwiftTagSequenceDefinition("SequenceA", "Identification of the Facility");
      MT646.U0003 = new SwiftTagDefinition("TransactionReferenceNumber_A_20", "Transaction Reference Number");
      MT646.U0003.TagName = ":20:";
      MT646.U0004 = new SwiftTagSubItemDefinition("Reference", "Transaction Reference Number");
      MT646.U0003.Elements.Add((SwiftDefinitionElement) MT646.U0004);
      MT646.U0002.Elements.Add((SwiftDefinitionElement) MT646.U0003);
      MT646.U0005 = new SwiftTagDefinition("RelatedReference_A_21", "Related Reference");
      MT646.U0005.TagName = ":21:";
      MT646.U0005.Mandatory = false;
      MT646.U0006 = new SwiftTagSubItemDefinition("Reference", "Related Reference");
      MT646.U0005.Elements.Add((SwiftDefinitionElement) MT646.U0006);
      MT646.U0002.Elements.Add((SwiftDefinitionElement) MT646.U0005);
      MT646.U0007 = new SwiftTagDefinition("FurtherIdentification_A_23", "Further Identification");
      MT646.U0007.TagName = ":23:";
      MT646.U0008 = new SwiftTagSubItemDefinition("FurtherIdentification", "Further Identification");
      MT646.U0007.Elements.Add((SwiftDefinitionElement) MT646.U0008);
      MT646.U0002.Elements.Add((SwiftDefinitionElement) MT646.U0007);
      MT646.U000E = new SwiftTagDefinition("From_A_29A", "From");
      MT646.U000E.TagName = ":29A:";
      MT646.U000E.Mandatory = false;
      MT646.U0002.Elements.Add((SwiftDefinitionElement) MT646.U000E);
      MT646.U000F = new SwiftTagDefinition("ToTheAttentionOf_A_29B", "To The Attention Of");
      MT646.U000F.TagName = ":29B:";
      MT646.U000F.Mandatory = false;
      MT646.U0002.Elements.Add((SwiftDefinitionElement) MT646.U000F);
      MT646.U0010 = new SwiftTagDefinition("Borrowers_A_88D", "Borrower's");
      MT646.U0010.TagName = ":88D:";
      MT646.U0011 = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT646.U0010.Elements.Add((SwiftDefinitionElement) MT646.U0011);
      MT646.U0002.Elements.Add((SwiftDefinitionElement) MT646.U0010);
      MT646.U0012 = new SwiftTagDefinition("OriginalFacilityAmount_A_32A", "Original Facility Amount");
      MT646.U0012.TagName = ":32A:";
      MT646.U0013 = new SwiftTagSubItemDefinition("Date", "Date");
      MT646.U0012.Elements.Add((SwiftDefinitionElement) MT646.U0013);
      MT646.U0014 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT646.U0012.Elements.Add((SwiftDefinitionElement) MT646.U0014);
      MT646.U0015 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT646.U0012.Elements.Add((SwiftDefinitionElement) MT646.U0015);
      MT646.U0002.Elements.Add((SwiftDefinitionElement) MT646.U0012);
      MT646.U0016 = new SwiftTagDefinition("DrawingIdentification_A_26P", "Drawing Identification");
      MT646.U0016.TagName = ":26P:";
      MT646.U0016.Mandatory = false;
      MT646.U0017 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT646.U0016.Elements.Add((SwiftDefinitionElement) MT646.U0017);
      MT646.U0018 = new SwiftTagSubItemDefinition("Identification", "Identification");
      MT646.U0016.Elements.Add((SwiftDefinitionElement) MT646.U0018);
      MT646.U0002.Elements.Add((SwiftDefinitionElement) MT646.U0016);
      MT646.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT646.U0002);
      MT646.U0019 = new SwiftTagSequenceDefinition("SequenceB", "Interest Calculation");
      MT646.U0019.Mandatory = false;
      MT646.U0019.Multiple = true;
      MT646.U001A = new SwiftTagDefinition("InterestPeriod_B_31F", "Interest Period");
      MT646.U001A.TagName = ":31F:";
      MT646.U001A.Mandatory = false;
      MT646.U001B = new SwiftTagSubItemDefinition("InterestPeriod", "Interest Period");
      MT646.U001C = new SwiftTagSubItemDefinition("StartDate", "Start Date");
      MT646.U001B.Elements.Add((SwiftDefinitionElement) MT646.U001C);
      MT646.U001D = new SwiftTagSubItemDefinition("EndDate", "End Date");
      MT646.U001E = new SwiftTagSubItemDefinition("EndDate_1", "End Date");
      MT646.U001D.Elements.Add((SwiftDefinitionElement) MT646.U001E);
      MT646.U001B.Elements.Add((SwiftDefinitionElement) MT646.U001D);
      MT646.U001A.Elements.Add((SwiftDefinitionElement) MT646.U001B);
      MT646.U001F = new SwiftTagSubItemDefinition("Origin", "Origin");
      MT646.U001F.Mandatory = false;
      MT646.U007F = new SwiftTagSubItemDefinition("Origin_1", "Origin");
      MT646.U001F.Elements.Add((SwiftDefinitionElement) MT646.U007F);
      MT646.U001A.Elements.Add((SwiftDefinitionElement) MT646.U001F);
      MT646.U0019.Elements.Add((SwiftDefinitionElement) MT646.U001A);
      MT646.U0080 = new SwiftTagDefinition("ComputationBaseAmount_B_33B", "Computation Base Amount");
      MT646.U0080.TagName = ":33B:";
      MT646.U0080.Mandatory = false;
      MT646.U0081 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT646.U0080.Elements.Add((SwiftDefinitionElement) MT646.U0081);
      MT646.U0082 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT646.U0080.Elements.Add((SwiftDefinitionElement) MT646.U0082);
      MT646.U0019.Elements.Add((SwiftDefinitionElement) MT646.U0080);
      MT646.U0083 = new SwiftTagDefinition("InterestAmount_B_34N", "Interest Amount");
      MT646.U0083.TagName = ":34N:";
      MT646.U0083.Mandatory = false;
      MT646.U0084 = new SwiftTagSubItemDefinition("InterestAmount", "Interest Amount");
      MT646.U0083.Elements.Add((SwiftDefinitionElement) MT646.U0084);
      MT646.U0019.Elements.Add((SwiftDefinitionElement) MT646.U0083);
      MT646.U0086 = new SwiftTagChoiceDefinition("Choice", "");
      MT646.U0086.Mandatory = false;
      MT646.U0086.Multiple = true;
      MT646.U0087 = new SwiftTagDefinition("InterestRate_B_37A", "Interest Rate");
      MT646.U0087.TagName = ":37A:";
      MT646.U0088 = new SwiftTagSubItemDefinition("InterestRate", "Interest Rate");
      MT646.U0087.Elements.Add((SwiftDefinitionElement) MT646.U0088);
      MT646.U0089 = new SwiftTagSubItemDefinition("TotalInterestRate", "End date,Period And Number");
      MT646.U0089.Mandatory = false;
      MT646.U008A = new SwiftTagSubItemDefinition("TotalInterestRate_1", "End date,Period And Number");
      MT646.U0089.Elements.Add((SwiftDefinitionElement) MT646.U008A);
      MT646.U0087.Elements.Add((SwiftDefinitionElement) MT646.U0089);
      MT646.U008B = new SwiftTagSubItemDefinition("Information", "Information");
      MT646.U008B.Mandatory = false;
      MT646.U008C = new SwiftTagSubItemDefinition("Information_1", "Information");
      MT646.U008B.Elements.Add((SwiftDefinitionElement) MT646.U008C);
      MT646.U0087.Elements.Add((SwiftDefinitionElement) MT646.U008B);
      MT646.U0086.Elements.Add((SwiftDefinitionElement) MT646.U0087);
      MT646.U008D = new SwiftTagDefinition("InterestRate_B_37B", "Interest Rate");
      MT646.U008D.TagName = ":37B:";
      MT646.U008E = new SwiftTagSubItemDefinition("InterestRate", "Interest Rate");
      MT646.U008D.Elements.Add((SwiftDefinitionElement) MT646.U008E);
      MT646.U008F = new SwiftTagSubItemDefinition("TotalInterestRate", "End date,Period And Number");
      MT646.U008F.Mandatory = false;
      MT646.U0090 = new SwiftTagSubItemDefinition("TotalInterestRate_1", "End date,Period And Number");
      MT646.U008F.Elements.Add((SwiftDefinitionElement) MT646.U0090);
      MT646.U008D.Elements.Add((SwiftDefinitionElement) MT646.U008F);
      MT646.U0091 = new SwiftTagSubItemDefinition("Information", "Information");
      MT646.U0091.Mandatory = false;
      MT646.U0092 = new SwiftTagSubItemDefinition("Information_1", "Information");
      MT646.U0091.Elements.Add((SwiftDefinitionElement) MT646.U0092);
      MT646.U008D.Elements.Add((SwiftDefinitionElement) MT646.U0091);
      MT646.U0086.Elements.Add((SwiftDefinitionElement) MT646.U008D);
      MT646.U0093 = new SwiftTagDefinition("InterestRate_B_37C", "Interest Rate");
      MT646.U0093.TagName = ":37C:";
      MT646.U0094 = new SwiftTagSubItemDefinition("InterestRate", "Interest Rate");
      MT646.U0093.Elements.Add((SwiftDefinitionElement) MT646.U0094);
      MT646.U0095 = new SwiftTagSubItemDefinition("TotalInterestRate", "End date,Period And Number");
      MT646.U0095.Mandatory = false;
      MT646.U0096 = new SwiftTagSubItemDefinition("TotalInterestRate_1", "End date,Period And Number");
      MT646.U0095.Elements.Add((SwiftDefinitionElement) MT646.U0096);
      MT646.U0093.Elements.Add((SwiftDefinitionElement) MT646.U0095);
      MT646.U0097 = new SwiftTagSubItemDefinition("Information", "Information");
      MT646.U0097.Mandatory = false;
      MT646.U0098 = new SwiftTagSubItemDefinition("Information_1", "Information");
      MT646.U0097.Elements.Add((SwiftDefinitionElement) MT646.U0098);
      MT646.U0093.Elements.Add((SwiftDefinitionElement) MT646.U0097);
      MT646.U0086.Elements.Add((SwiftDefinitionElement) MT646.U0093);
      MT646.U0099 = new SwiftTagDefinition("InterestRate_B_37D", "Interest Rate");
      MT646.U0099.TagName = ":37D:";
      MT646.U009A = new SwiftTagSubItemDefinition("InterestRate", "Interest Rate");
      MT646.U0099.Elements.Add((SwiftDefinitionElement) MT646.U009A);
      MT646.U009B = new SwiftTagSubItemDefinition("TotalInterestRate", "End date,Period And Number");
      MT646.U009B.Mandatory = false;
      MT646.U009C = new SwiftTagSubItemDefinition("TotalInterestRate_1", "End date,Period And Number");
      MT646.U009B.Elements.Add((SwiftDefinitionElement) MT646.U009C);
      MT646.U0099.Elements.Add((SwiftDefinitionElement) MT646.U009B);
      MT646.U009D = new SwiftTagSubItemDefinition("Information", "Information");
      MT646.U009D.Mandatory = false;
      MT646.U009E = new SwiftTagSubItemDefinition("Information_1", "Information");
      MT646.U009D.Elements.Add((SwiftDefinitionElement) MT646.U009E);
      MT646.U0099.Elements.Add((SwiftDefinitionElement) MT646.U009D);
      MT646.U0086.Elements.Add((SwiftDefinitionElement) MT646.U0099);
      MT646.U009F = new SwiftTagDefinition("InterestRate_B_37E", "Interest Rate");
      MT646.U009F.TagName = ":37E:";
      MT646.U0001U0002 = new SwiftTagSubItemDefinition("InterestRate", "Interest Rate");
      MT646.U009F.Elements.Add((SwiftDefinitionElement) MT646.U0001U0002);
      MT646.U0002U0002 = new SwiftTagSubItemDefinition("TotalInterestRate", "End date,Period And Number");
      MT646.U0002U0002.Mandatory = false;
      MT646.U0003U0002 = new SwiftTagSubItemDefinition("TotalInterestRate_1", "End date,Period And Number");
      MT646.U0002U0002.Elements.Add((SwiftDefinitionElement) MT646.U0003U0002);
      MT646.U009F.Elements.Add((SwiftDefinitionElement) MT646.U0002U0002);
      MT646.U0004U0002 = new SwiftTagSubItemDefinition("Information", "Information");
      MT646.U0004U0002.Mandatory = false;
      MT646.U0005U0002 = new SwiftTagSubItemDefinition("Information_1", "Information");
      MT646.U0004U0002.Elements.Add((SwiftDefinitionElement) MT646.U0005U0002);
      MT646.U009F.Elements.Add((SwiftDefinitionElement) MT646.U0004U0002);
      MT646.U0086.Elements.Add((SwiftDefinitionElement) MT646.U009F);
      MT646.U0006U0002 = new SwiftTagDefinition("InterestRate_B_37F", "Interest Rate");
      MT646.U0006U0002.TagName = ":37F:";
      MT646.U0007U0002 = new SwiftTagSubItemDefinition("InterestRate", "Interest Rate");
      MT646.U0006U0002.Elements.Add((SwiftDefinitionElement) MT646.U0007U0002);
      MT646.U0008U0002 = new SwiftTagSubItemDefinition("TotalInterestRate", "End date,Period And Number");
      MT646.U0008U0002.Mandatory = false;
      MT646.U000EU0002 = new SwiftTagSubItemDefinition("TotalInterestRate_1", "End date,Period And Number");
      MT646.U0008U0002.Elements.Add((SwiftDefinitionElement) MT646.U000EU0002);
      MT646.U0006U0002.Elements.Add((SwiftDefinitionElement) MT646.U0008U0002);
      MT646.U000FU0002 = new SwiftTagSubItemDefinition("Information", "Information");
      MT646.U000FU0002.Mandatory = false;
      MT646.U0010U0002 = new SwiftTagSubItemDefinition("Information_1", "Information");
      MT646.U000FU0002.Elements.Add((SwiftDefinitionElement) MT646.U0010U0002);
      MT646.U0006U0002.Elements.Add((SwiftDefinitionElement) MT646.U000FU0002);
      MT646.U0086.Elements.Add((SwiftDefinitionElement) MT646.U0006U0002);
      MT646.U0019.Elements.Add((SwiftDefinitionElement) MT646.U0086);
      MT646.U0011U0002 = new SwiftTagDefinition("SenderToRecieverInformation_B_72", "Sender To Receiver Information");
      MT646.U0011U0002.TagName = ":72:";
      MT646.U0011U0002.Mandatory = false;
      MT646.U0019.Elements.Add((SwiftDefinitionElement) MT646.U0011U0002);
      MT646.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT646.U0019);
      MT646.U0012U0002 = new SwiftTagSequenceDefinition("SequenceC", "Principal Payment/Sum of Interest Due");
      MT646.U0013U0002 = new SwiftTagDefinition("TotalPrincipalAmountRepaidPrepaid_C_32A", "Total Principal Amount Repaid/Prepaid");
      MT646.U0013U0002.TagName = ":32A:";
      MT646.U0014U0002 = new SwiftTagSubItemDefinition("Date", "Date");
      MT646.U0013U0002.Elements.Add((SwiftDefinitionElement) MT646.U0014U0002);
      MT646.U0015U0002 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT646.U0013U0002.Elements.Add((SwiftDefinitionElement) MT646.U0015U0002);
      MT646.U0016U0002 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT646.U0013U0002.Elements.Add((SwiftDefinitionElement) MT646.U0016U0002);
      MT646.U0012U0002.Elements.Add((SwiftDefinitionElement) MT646.U0013U0002);
      MT646.U0017U0002 = new SwiftTagDefinition("PrincipalAmountDueToReceiver_C_32N", "Principal Amount Due to Receiver");
      MT646.U0017U0002.TagName = ":32N:";
      MT646.U0017U0002.Mandatory = false;
      MT646.U0018U0002 = new SwiftTagSubItemDefinition("PrincipalAmountDueToReceiver", "Principal Amount Due to Receiver");
      MT646.U0017U0002.Elements.Add((SwiftDefinitionElement) MT646.U0018U0002);
      MT646.U0012U0002.Elements.Add((SwiftDefinitionElement) MT646.U0017U0002);
      MT646.U0019U0002 = new SwiftTagDefinition("GrossInterestAmountDueToReceiver_C_33N", "Gross Interest Amount Due to Receiver");
      MT646.U0019U0002.TagName = ":33N:";
      MT646.U0019U0002.Mandatory = false;
      MT646.U001AU0002 = new SwiftTagSubItemDefinition("GrossInterestAmountDueToReceiver", "Gross Interest Amount Due to Receiver");
      MT646.U0019U0002.Elements.Add((SwiftDefinitionElement) MT646.U001AU0002);
      MT646.U0012U0002.Elements.Add((SwiftDefinitionElement) MT646.U0019U0002);
      MT646.U001BU0002 = new SwiftTagDefinition("NetInterestAmountDueToReceiver_C_34N", "Net Interest Amount Due to Receiver");
      MT646.U001BU0002.TagName = ":34N:";
      MT646.U001BU0002.Mandatory = false;
      MT646.U001CU0002 = new SwiftTagSubItemDefinition("NetInterestAmountDueToReceiver", "Net Interest Amount Due to Receiver");
      MT646.U001BU0002.Elements.Add((SwiftDefinitionElement) MT646.U001CU0002);
      MT646.U0012U0002.Elements.Add((SwiftDefinitionElement) MT646.U001BU0002);
      MT646.U001DU0002 = new SwiftTagChoiceDefinition("Choice", "");
      MT646.U001DU0002.Mandatory = false;
      MT646.U001DU0002.Multiple = true;
      MT646.U001EU0002 = new SwiftTagDefinition("TotalAmountTransferred_C_34P", "Total Amount Transferred");
      MT646.U001EU0002.TagName = ":34P:";
      MT646.U001FU0002 = new SwiftTagSubItemDefinition("Date", "Date");
      MT646.U001EU0002.Elements.Add((SwiftDefinitionElement) MT646.U001FU0002);
      MT646.U007FU0002 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT646.U001EU0002.Elements.Add((SwiftDefinitionElement) MT646.U007FU0002);
      MT646.U0080U0002 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT646.U001EU0002.Elements.Add((SwiftDefinitionElement) MT646.U0080U0002);
      MT646.U001DU0002.Elements.Add((SwiftDefinitionElement) MT646.U001EU0002);
      MT646.U0081U0002 = new SwiftTagDefinition("TotalAmountTransferred_C_34R", "Total Amount Transferred");
      MT646.U0081U0002.TagName = ":34R:";
      MT646.U0082U0002 = new SwiftTagSubItemDefinition("Date", "Date");
      MT646.U0081U0002.Elements.Add((SwiftDefinitionElement) MT646.U0082U0002);
      MT646.U0083U0002 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT646.U0081U0002.Elements.Add((SwiftDefinitionElement) MT646.U0083U0002);
      MT646.U0084U0002 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT646.U0081U0002.Elements.Add((SwiftDefinitionElement) MT646.U0084U0002);
      MT646.U001DU0002.Elements.Add((SwiftDefinitionElement) MT646.U0081U0002);
      MT646.U0012U0002.Elements.Add((SwiftDefinitionElement) MT646.U001DU0002);
      MT646.U0086U0002 = new SwiftTagChoiceDefinition("Choice", "");
      MT646.U0086U0002.Mandatory = false;
      MT646.U0086U0002.Multiple = true;
      MT646.U0087U0002 = new SwiftTagDefinition("AccountWithInstitution_C_57A", "Account With Institution");
      MT646.U0087U0002.TagName = ":57A:";
      MT646.U0088U0002 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT646.U0088U0002.Mandatory = false;
      MT646.U0087U0002.Elements.Add((SwiftDefinitionElement) MT646.U0088U0002);
      MT646.U0089U0002 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT646.U0087U0002.Elements.Add((SwiftDefinitionElement) MT646.U0089U0002);
      MT646.U0086U0002.Elements.Add((SwiftDefinitionElement) MT646.U0087U0002);
      MT646.U008AU0002 = new SwiftTagDefinition("AccountWithInstitution_C_57B", "Account With Institution");
      MT646.U008AU0002.TagName = ":57B:";
      MT646.U008BU0002 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT646.U008BU0002.Mandatory = false;
      MT646.U008AU0002.Elements.Add((SwiftDefinitionElement) MT646.U008BU0002);
      MT646.U008CU0002 = new SwiftTagSubItemDefinition("Location", "Location");
      MT646.U008CU0002.Mandatory = false;
      MT646.U008AU0002.Elements.Add((SwiftDefinitionElement) MT646.U008CU0002);
      MT646.U0086U0002.Elements.Add((SwiftDefinitionElement) MT646.U008AU0002);
      MT646.U008DU0002 = new SwiftTagDefinition("AccountWithInstitution_C_57D", "Account With Institution");
      MT646.U008DU0002.TagName = ":57D:";
      MT646.U008EU0002 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT646.U008EU0002.Mandatory = false;
      MT646.U008DU0002.Elements.Add((SwiftDefinitionElement) MT646.U008EU0002);
      MT646.U008FU0002 = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT646.U008DU0002.Elements.Add((SwiftDefinitionElement) MT646.U008FU0002);
      MT646.U0086U0002.Elements.Add((SwiftDefinitionElement) MT646.U008DU0002);
      MT646.U0012U0002.Elements.Add((SwiftDefinitionElement) MT646.U0086U0002);
      MT646.U0090U0002 = new SwiftTagDefinition("DetailsOfAdjustments_C_71C", "Details of Adjustments");
      MT646.U0090U0002.TagName = ":71C:";
      MT646.U0090U0002.Mandatory = false;
      MT646.U0091U0002 = new SwiftTagSubItemDefinition("Line1", "Line with a maximum of 35 SWIFT characters having format as /8a/[3!a13d][additional information]");
      MT646.U0090U0002.Elements.Add((SwiftDefinitionElement) MT646.U0091U0002);
      MT646.U0092U0002 = new SwiftTagSubItemDefinition("Line2", "Line with a maximum of 35 SWIFT characters");
      MT646.U0092U0002.Mandatory = false;
      MT646.U0090U0002.Elements.Add((SwiftDefinitionElement) MT646.U0092U0002);
      MT646.U0093U0002 = new SwiftTagSubItemDefinition("Line3", "Line with a maximum of 35 SWIFT characters");
      MT646.U0093U0002.Mandatory = false;
      MT646.U0090U0002.Elements.Add((SwiftDefinitionElement) MT646.U0093U0002);
      MT646.U0094U0002 = new SwiftTagSubItemDefinition("Line4", "Line with a maximum of 35 SWIFT characters");
      MT646.U0094U0002.Mandatory = false;
      MT646.U0090U0002.Elements.Add((SwiftDefinitionElement) MT646.U0094U0002);
      MT646.U0095U0002 = new SwiftTagSubItemDefinition("Line5", "Line with a maximum of 35 SWIFT characters");
      MT646.U0095U0002.Mandatory = false;
      MT646.U0090U0002.Elements.Add((SwiftDefinitionElement) MT646.U0095U0002);
      MT646.U0096U0002 = new SwiftTagSubItemDefinition("Line6", "Line with a maximum of 35 SWIFT characters");
      MT646.U0096U0002.Mandatory = false;
      MT646.U0090U0002.Elements.Add((SwiftDefinitionElement) MT646.U0096U0002);
      MT646.U0012U0002.Elements.Add((SwiftDefinitionElement) MT646.U0090U0002);
      MT646.U0097U0002 = new SwiftTagDefinition("SenderToRecieverInformation_C_72", "Sender To Receiver Information");
      MT646.U0097U0002.TagName = ":72:";
      MT646.U0097U0002.Mandatory = false;
      MT646.U0012U0002.Elements.Add((SwiftDefinitionElement) MT646.U0097U0002);
      MT646.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT646.U0012U0002);
    }

    public class SequenceAClass : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT646.U0002;
        }
      }

      [Description("Transaction Reference Number")]
      public Tag20 TransactionReferenceNumber_A_20
      {
        get
        {
          return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0003);
        }
      }

      [Description("Transaction Reference Number")]
      public Tag20 Tag20_TransactionReferenceNumber_A
      {
        get
        {
          return this.TransactionReferenceNumber_A_20;
        }
      }

      [Description("Related Reference")]
      public Tag21 RelatedReference_A_21
      {
        get
        {
          return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0005);
        }
      }

      [Description("Related Reference")]
      public Tag21 Tag21_RelatedReference_A
      {
        get
        {
          return this.RelatedReference_A_21;
        }
      }

      [Description("Further Identification")]
      public MT646.SequenceAClass.Tag23 FurtherIdentification_A_23
      {
        get
        {
          return new MT646.SequenceAClass.Tag23((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0007);
        }
      }

      [Description("Further Identification")]
      public MT646.SequenceAClass.Tag23 Tag23_FurtherIdentification_A
      {
        get
        {
          return this.FurtherIdentification_A_23;
        }
      }

      [Description("From")]
      public Tag29A From_A_29A
      {
        get
        {
          return new Tag29A((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U000E);
        }
      }

      [Description("From")]
      public Tag29A Tag29A_From_A
      {
        get
        {
          return this.From_A_29A;
        }
      }

      [Description("To The Attention Of")]
      public Tag29B ToTheAttentionOf_A_29B
      {
        get
        {
          return new Tag29B((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U000F);
        }
      }

      [Description("To The Attention Of")]
      public Tag29B Tag29B_ToTheAttentionOf_A
      {
        get
        {
          return this.ToTheAttentionOf_A_29B;
        }
      }

      [Description("Borrower's")]
      public MT646.SequenceAClass.Tag88D Borrowers_A_88D
      {
        get
        {
          return new MT646.SequenceAClass.Tag88D((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0010);
        }
      }

      [Description("Borrower's")]
      public MT646.SequenceAClass.Tag88D Tag88D_Borrowers_A
      {
        get
        {
          return this.Borrowers_A_88D;
        }
      }

      [Description("Original Facility Amount")]
      public Tag32A OriginalFacilityAmount_A_32A
      {
        get
        {
          return new Tag32A((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0012);
        }
      }

      [Description("Original Facility Amount")]
      public Tag32A Tag32A_OriginalFacilityAmount_A
      {
        get
        {
          return this.OriginalFacilityAmount_A_32A;
        }
      }

      [Description("Drawing Identification")]
      public Tag26P DrawingIdentification_A_26P
      {
        get
        {
          return new Tag26P((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0016);
        }
      }

      [Description("Drawing Identification")]
      public Tag26P Tag26P_DrawingIdentification_A
      {
        get
        {
          return this.DrawingIdentification_A_26P;
        }
      }

      internal SequenceAClass(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public class Tag23 : SwiftTagWrapper
      {
        public string Value
        {
          get
          {
            return this.GetValue();
          }
          set
          {
            this.SetValue("23", value);
          }
        }

        internal Tag23(SwiftElement parent, int index, SwiftDefinitionElement definition)
          : base(parent, index, definition)
        {
        }
      }

      public class Tag88D : SwiftTagWrapper
      {
        public string Value
        {
          get
          {
            return this.GetValue();
          }
          set
          {
            this.SetValue("88D", value);
          }
        }

        internal Tag88D(SwiftElement parent, int index, SwiftDefinitionElement definition)
          : base(parent, index, definition)
        {
        }
      }
    }

    public class SequenceBClass : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT646.U0019;
        }
      }

      [Description("Interest Period")]
      public MT646.SequenceBClass.Tag31F InterestPeriod_B_31F
      {
        get
        {
          return new MT646.SequenceBClass.Tag31F((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U001A);
        }
      }

      [Description("Interest Period")]
      public MT646.SequenceBClass.Tag31F Tag31F_InterestPeriod_B
      {
        get
        {
          return this.InterestPeriod_B_31F;
        }
      }

      [Description("Computation Base Amount")]
      public Tag33B ComputationBaseAmount_B_33B
      {
        get
        {
          return new Tag33B((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0080);
        }
      }

      [Description("Computation Base Amount")]
      public Tag33B Tag33B_ComputationBaseAmount_B
      {
        get
        {
          return this.ComputationBaseAmount_B_33B;
        }
      }

      [Description("Interest Amount")]
      public MT646.SequenceBClass.Tag34N InterestAmount_B_34N
      {
        get
        {
          return new MT646.SequenceBClass.Tag34N((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0083);
        }
      }

      [Description("Interest Amount")]
      public MT646.SequenceBClass.Tag34N Tag34N_InterestAmount_B
      {
        get
        {
          return this.InterestAmount_B_34N;
        }
      }

      [Description("Interest Rate")]
      public Tag37A InterestRate_B_37A
      {
        get
        {
          return new Tag37A((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0087);
        }
      }

      [Description("Interest Rate")]
      public Tag37A Tag37A_InterestRate_B
      {
        get
        {
          return this.InterestRate_B_37A;
        }
      }

      [Description("Interest Rate")]
      public Tag37B InterestRate_B_37B
      {
        get
        {
          return new Tag37B((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U008D);
        }
      }

      [Description("Interest Rate")]
      public Tag37B Tag37B_InterestRate_B
      {
        get
        {
          return this.InterestRate_B_37B;
        }
      }

      [Description("Interest Rate")]
      public Tag37C InterestRate_B_37C
      {
        get
        {
          return new Tag37C((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0093);
        }
      }

      [Description("Interest Rate")]
      public Tag37C Tag37C_InterestRate_B
      {
        get
        {
          return this.InterestRate_B_37C;
        }
      }

      [Description("Interest Rate")]
      public Tag37D InterestRate_B_37D
      {
        get
        {
          return new Tag37D((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0099);
        }
      }

      [Description("Interest Rate")]
      public Tag37D Tag37D_InterestRate_B
      {
        get
        {
          return this.InterestRate_B_37D;
        }
      }

      [Description("Interest Rate")]
      public Tag37E InterestRate_B_37E
      {
        get
        {
          return new Tag37E((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U009F);
        }
      }

      [Description("Interest Rate")]
      public Tag37E Tag37E_InterestRate_B
      {
        get
        {
          return this.InterestRate_B_37E;
        }
      }

      [Description("Interest Rate")]
      public Tag37F InterestRate_B_37F
      {
        get
        {
          return new Tag37F((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0006U0002);
        }
      }

      [Description("Interest Rate")]
      public Tag37F Tag37F_InterestRate_B
      {
        get
        {
          return this.InterestRate_B_37F;
        }
      }

      [Description("Sender To Receiver Information")]
      public Tag72 SenderToRecieverInformation_B_72
      {
        get
        {
          return new Tag72((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0011U0002);
        }
      }

      [Description("Sender To Receiver Information")]
      public Tag72 Tag72_SenderToRecieverInformation_B
      {
        get
        {
          return this.SenderToRecieverInformation_B_72;
        }
      }

      internal SequenceBClass(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public class Tag31F : SwiftTagWrapper
      {
        public string Value
        {
          get
          {
            return this.GetValue();
          }
          set
          {
            this.SetValue("31F", value);
          }
        }

        internal Tag31F(SwiftElement parent, int index, SwiftDefinitionElement definition)
          : base(parent, index, definition)
        {
        }
      }

      public class Tag34N : SwiftTagWrapper
      {
        public string Value
        {
          get
          {
            return this.GetValue();
          }
          set
          {
            this.SetValue("34N", value);
          }
        }

        internal Tag34N(SwiftElement parent, int index, SwiftDefinitionElement definition)
          : base(parent, index, definition)
        {
        }
      }
    }

    public class SequenceCClass : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT646.U0012U0002;
        }
      }

      [Description("Total Principal Amount Repaid/Prepaid")]
      public Tag32A TotalPrincipalAmountRepaidPrepaid_C_32A
      {
        get
        {
          return new Tag32A((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0013U0002);
        }
      }

      [Description("Total Principal Amount Repaid/Prepaid")]
      public Tag32A Tag32A_TotalPrincipalAmountRepaidPrepaid_C
      {
        get
        {
          return this.TotalPrincipalAmountRepaidPrepaid_C_32A;
        }
      }

      [Description("Principal Amount Due to Receiver")]
      public Tag32N PrincipalAmountDueToReceiver_C_32N
      {
        get
        {
          return new Tag32N((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0017U0002);
        }
      }

      [Description("Principal Amount Due to Receiver")]
      public Tag32N Tag32N_PrincipalAmountDueToReceiver_C
      {
        get
        {
          return this.PrincipalAmountDueToReceiver_C_32N;
        }
      }

      [Description("Gross Interest Amount Due to Receiver")]
      public Tag33N GrossInterestAmountDueToReceiver_C_33N
      {
        get
        {
          return new Tag33N((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0019U0002);
        }
      }

      [Description("Gross Interest Amount Due to Receiver")]
      public Tag33N Tag33N_GrossInterestAmountDueToReceiver_C
      {
        get
        {
          return this.GrossInterestAmountDueToReceiver_C_33N;
        }
      }

      [Description("Net Interest Amount Due to Receiver")]
      public MT646.SequenceCClass.Tag34N NetInterestAmountDueToReceiver_C_34N
      {
        get
        {
          return new MT646.SequenceCClass.Tag34N((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U001BU0002);
        }
      }

      [Description("Net Interest Amount Due to Receiver")]
      public MT646.SequenceCClass.Tag34N Tag34N_NetInterestAmountDueToReceiver_C
      {
        get
        {
          return this.NetInterestAmountDueToReceiver_C_34N;
        }
      }

      [Description("Total Amount Transferred")]
      public Tag34P TotalAmountTransferred_C_34P
      {
        get
        {
          return new Tag34P((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U001EU0002);
        }
      }

      [Description("Total Amount Transferred")]
      public Tag34P Tag34P_TotalAmountTransferred_C
      {
        get
        {
          return this.TotalAmountTransferred_C_34P;
        }
      }

      [Description("Total Amount Transferred")]
      public Tag34R TotalAmountTransferred_C_34R
      {
        get
        {
          return new Tag34R((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0081U0002);
        }
      }

      [Description("Total Amount Transferred")]
      public Tag34R Tag34R_TotalAmountTransferred_C
      {
        get
        {
          return this.TotalAmountTransferred_C_34R;
        }
      }

      [Description("Account With Institution")]
      public Tag57A AccountWithInstitution_C_57A
      {
        get
        {
          return new Tag57A((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0087U0002);
        }
      }

      [Description("Account With Institution")]
      public Tag57A Tag57A_AccountWithInstitution_C
      {
        get
        {
          return this.AccountWithInstitution_C_57A;
        }
      }

      [Description("Account With Institution")]
      public Tag57B AccountWithInstitution_C_57B
      {
        get
        {
          return new Tag57B((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U008AU0002);
        }
      }

      [Description("Account With Institution")]
      public Tag57B Tag57B_AccountWithInstitution_C
      {
        get
        {
          return this.AccountWithInstitution_C_57B;
        }
      }

      [Description("Account With Institution")]
      public Tag57D AccountWithInstitution_C_57D
      {
        get
        {
          return new Tag57D((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U008DU0002);
        }
      }

      [Description("Account With Institution")]
      public Tag57D Tag57D_AccountWithInstitution_C
      {
        get
        {
          return this.AccountWithInstitution_C_57D;
        }
      }

      [Description("Details of Adjustments")]
      public Tag71C DetailsOfAdjustments_C_71C
      {
        get
        {
          return new Tag71C((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0090U0002);
        }
      }

      [Description("Details of Adjustments")]
      public Tag71C Tag71C_DetailsOfAdjustments_C
      {
        get
        {
          return this.DetailsOfAdjustments_C_71C;
        }
      }

      [Description("Sender To Receiver Information")]
      public Tag72 SenderToRecieverInformation_C_72
      {
        get
        {
          return new Tag72((SwiftElement) this, 0, (SwiftDefinitionElement) MT646.U0097U0002);
        }
      }

      [Description("Sender To Receiver Information")]
      public Tag72 Tag72_SenderToRecieverInformation_C
      {
        get
        {
          return this.SenderToRecieverInformation_C_72;
        }
      }

      internal SequenceCClass(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public class Tag34N : SwiftTagWrapper
      {
        public string Value
        {
          get
          {
            return this.GetValue();
          }
          set
          {
            this.SetValue("34N", value);
          }
        }

        internal Tag34N(SwiftElement parent, int index, SwiftDefinitionElement definition)
          : base(parent, index, definition)
        {
        }
      }
    }
  }
}
